// app.js\
"use strict";
App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    wx.getSetting({
      withSubscriptions: true,
      success(res) {
        if(!res.authSetting["scope.userInfo"]) {
          wx.authorize({
            scope: 'scope.userInfo'
          })
        }
      }
    })
  },
  globalData: {
    userInfo: null
  }
})
